﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using WMI.NET.ComputerSystemHardware;
using System.Collections.Generic;
using WMI.NET.ComputerSystemHardware.MassStorage;
using WMI.NET.ComputerSystemHardware.MotherboardControllerPort;
using System.Management;
using System.Reflection;

namespace WMI.NET.Tests
{
    [TestClass]
    public class ComputerSystemHardware
    {


        #region MassStorage


        [TestMethod]
        public void GetWin32_DiskDrives()
        {
            var GetWin32_DiskDrives = new WMI.NET.ComputerSystemHardware.MassStorage.GetWin32_DiskDrives();
            var t1 = GetWin32_DiskDrives.GetCollection();

            Assert.IsNotNull(t1);
        }

        [TestMethod]
        public void GetWin32_PhysicalMedias()
        {
            var GetWin32_PhysicalMedias = new WMI.NET.ComputerSystemHardware.MassStorage.GetWin32_PhysicalMedia();
            var t2 = GetWin32_PhysicalMedias.GetCollection();

            Assert.IsNotNull(t2);
        }

        [TestMethod]
        public void GetWin32_AutochkSettings()
        {
            var GetWin32_AutochkSettings = new WMI.NET.ComputerSystemHardware.MassStorage.GetWin32_AutochkSettings();
            var t3 = GetWin32_AutochkSettings.GetCollection();

            Assert.IsNotNull(t3);
        }

        [TestMethod]
        public void GetWin32_CDROMDrives()
        {
            var GetWin32_CDROMDrives = new WMI.NET.ComputerSystemHardware.MassStorage.GetWin32_CDROMDrives();
            var t4 = GetWin32_CDROMDrives.GetCollection();

            Assert.IsNotNull(t4);
        }

        [TestMethod]
        public void GetWin32_FloppyDrives()
        {
            var GetWin32_FloppyDrives = new WMI.NET.ComputerSystemHardware.MassStorage.GetWin32_FloppyDrives();
            var t5 = GetWin32_FloppyDrives.GetCollection();

            Assert.IsNotNull(t5);
        }

        [TestMethod]
        public void GetWin32_TapeDrives()
        {
            var GetWin32_TapeDrives = new WMI.NET.ComputerSystemHardware.MassStorage.GetWin32_TapeDrives();
            var t6 = GetWin32_TapeDrives.GetCollection();

            Assert.IsNotNull(t6);
        }


        #endregion



        #region MotherboardControllerPort

        [TestMethod]
        public void GetWin32_PhysicalMemories()
        {
            var GetWin32_PhysicalMemories = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_PhysicalMemories();
            var t1 = GetWin32_PhysicalMemories.GetCollection();

            Assert.IsNotNull(t1);
        }

        [TestMethod]
        public void GetWin32_SerialPorts()
        {
            var GetWin32_SerialPorts = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_SerialPorts();
            var t2 = GetWin32_SerialPorts.GetCollection();

            Assert.IsNotNull(t2);
        }

        [TestMethod]
        public void GetWin32_BIOS()
        {
            var GetWin32_BIOS = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_BIOS();
            var t3 = GetWin32_BIOS.GetCollection();

            Assert.IsNotNull(t3);
        }

        [TestMethod]
        public void GetWin32_MotherboardDevices()
        {
            var GetWin32_MotherboardDevices = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_MotherboardDevices();
            var t4 = GetWin32_MotherboardDevices.GetCollection();

            Assert.IsNotNull(t4);
        }

        [TestMethod]
        public void GetWin32_USBControllers()
        {
            var GetWin32_USBControllers = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_USBControllers();
            var t5 = GetWin32_USBControllers.GetCollection();

            Assert.IsNotNull(t5);
        }

        [TestMethod]
        public void GetWin32_OnBoardDevices()
        {
            var GetWin32_OnBoardDevices = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_OnBoardDevices();
            var t6 = GetWin32_OnBoardDevices.GetCollection();

            Assert.IsNotNull(t6);
        }

        [TestMethod]
        public void GetWin32_1394Controllers()
        {
            var GetWin32_1394Controllers = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_1394Controllers();
            var t7 = GetWin32_1394Controllers.GetCollection();

            Assert.IsNotNull(t7);
        }

        [TestMethod]
        public void GetWin32_1394ControllerDevices()
        {
            var GetWin32_1394ControllerDevices = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_1394Controllers();
            var t8 = GetWin32_1394ControllerDevices.GetCollection();

            Assert.IsNotNull(t8);
        }

        [TestMethod]
        public void GetWin32_AllocatedResources()
        {
            var GetWin32_AllocatedResources = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_AllocatedResources();
            var t9 = GetWin32_AllocatedResources.GetCollection();

            Assert.IsNotNull(t9);
        }

        [TestMethod]
        public void GetWin32_PnPAllocatedResources()
        {
            // has a bug
            //var GetWin32_PnPAllocatedResources = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_PnPAllocatedResources();
            //var t10 = GetWin32_PnPAllocatedResources.GetCollection();

            //Assert.IsNotNull(t10);
        }

        [TestMethod]
        public void GetWin32_IRQResources()
        {
            var GetWin32_IRQResources = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_IRQResources();
            var t11 = GetWin32_IRQResources.GetCollection();

            Assert.IsNotNull(t11);
        }

        [TestMethod]
        public void GetWin32_SystemMemoryResources()
        {
            var GetWin32_SystemMemoryResources = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_SystemMemoryResources();
            var t12 = GetWin32_SystemMemoryResources.GetCollection();

            Assert.IsNotNull(t12);
        }


        [TestMethod]
        public void GetWin32_DeviceMemoryAddresses()
        {
            var GetWin32_DeviceMemoryAddresses = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_DeviceMemoryAddresses();
            var t13 = GetWin32_DeviceMemoryAddresses.GetCollection();

            Assert.IsNotNull(t13);
        }

        [TestMethod]
        public void GetWin32_PortResources()
        {
            var GetWin32_PortResources = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_PortResources();
            var t14 = GetWin32_PortResources.GetCollection();

            Assert.IsNotNull(t14);
        }

        [TestMethod]
        public void GetWin32_IDEControllers()
        {
            var GetWin32_IDEControllers = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_IDEControllers();
            var t15 = GetWin32_IDEControllers.GetCollection();

            Assert.IsNotNull(t15);
        }

        [TestMethod]
        public void GetWin32_SCSIControllers()
        {
            var GetWin32_SCSIControllers = new WMI.NET.ComputerSystemHardware.MotherboardControllerPort.GetWin32_SCSIControllers();
            var t16 = GetWin32_SCSIControllers.GetCollection();

            Assert.IsNotNull(t16);
        }

        #endregion




        #region InputDevice

        [TestMethod]
        public void GetWin32_PointingDevices()
        {
            var GetWin32_PointingDevices = new WMI.NET.ComputerSystemHardware.InputDevice.GetWin32_PointingDevices();
            var t1 = GetWin32_PointingDevices.GetCollection();

            Assert.IsNotNull(t1);

        }

        [TestMethod]
        public void GetWin32_Keyboards()
        {
            var GetWin32_Keyboards = new WMI.NET.ComputerSystemHardware.InputDevice.GetWin32_Keyboards();
            var t2 = GetWin32_Keyboards.GetCollection();

            Assert.IsNotNull(t2);
        }

        #endregion





        #region CoolingDevice

        [TestMethod]
        public void GetWin32_Fans()
        {
            var GetWin32_Fans = new WMI.NET.ComputerSystemHardware.CoolingDevice.GetWin32_Fans();
            var t1 = GetWin32_Fans.GetCollection();

            Assert.IsNotNull(t1);
        }

        [TestMethod]
        public void GetWin32_HeatPipes()
        {
            var GetWin32_HeatPipes = new WMI.NET.ComputerSystemHardware.CoolingDevice.GetWin32_HeatPipes();
            var t2 = GetWin32_HeatPipes.GetCollection();

            Assert.IsNotNull(t2);
        }

        [TestMethod]
        public void GetWin32_Refrigerations()
        {
            var GetWin32_Refrigerations = new WMI.NET.ComputerSystemHardware.CoolingDevice.GetWin32_Refrigerations();
            var t3 = GetWin32_Refrigerations.GetCollection();

            Assert.IsNotNull(t3);
        }

        [TestMethod]
        public void GetWin32_TemperatureProbes()
        {
            var GetWin32_TemperatureProbes = new WMI.NET.ComputerSystemHardware.CoolingDevice.GetWin32_TemperatureProbes();
            var t4 = GetWin32_TemperatureProbes.GetCollection();

            Assert.IsNotNull(t4);
        }

        #endregion




        #region NetworkingDevice

        [TestMethod]
        public void GetWin32_NetworkAdapters()
        {
            var GetWin32_NetworkAdapters = new WMI.NET.ComputerSystemHardware.NetworkingDevice.GetWin32_NetworkAdapters();
            var t1 = GetWin32_NetworkAdapters.GetCollection();

            Assert.IsNotNull(t1);
        }

        #endregion




        #region Printing

        [TestMethod]
        public void GetWin32_Printers()
        {
            var GetWin32_Printers = new WMI.NET.ComputerSystemHardware.Printing.GetWin32_Printers();
            var t1 = GetWin32_Printers.GetCollection();

            Assert.IsNotNull(t1);
        }

        [TestMethod]
        public void GetWin32_PrinterDrivers()
        {
            var GetWin32_PrinterDrivers = new WMI.NET.ComputerSystemHardware.Printing.GetWin32_PrinterDrivers();
            var t2 = GetWin32_PrinterDrivers.GetCollection();

            Assert.IsNotNull(t2);
        }

        [TestMethod]
        public void GetWin32_DriverForDevices()
        {
            var GetWin32_DriverForDevices = new WMI.NET.ComputerSystemHardware.Printing.GetWin32_DriverForDevices();
            var t3 = GetWin32_DriverForDevices.GetCollection();

            Assert.IsNotNull(t3);
        }

        #endregion




        #region VideoAndMonitor

        [TestMethod]
        public void GetWin32_DesktopMonitors()
        {
            var GetWin32_DesktopMonitors = new WMI.NET.ComputerSystemHardware.VideoAndMonitor.GetWin32_DesktopMonitors();
            var t1 = GetWin32_DesktopMonitors.GetCollection();

            Assert.IsNotNull(t1);

        }

        [TestMethod]
        public void GetWin32_VideoControllers()
        {
            var GetWin32_VideoControllers = new WMI.NET.ComputerSystemHardware.VideoAndMonitor.GetWin32_VideoControllers();
            var t2 = GetWin32_VideoControllers.GetCollection();

            Assert.IsNotNull(t2);
        }

        [TestMethod]
        public void GetWin32_DisplayConfigurations()
        {
            var GetWin32_DisplayConfigurations = new WMI.NET.ComputerSystemHardware.VideoAndMonitor.GetWin32_DisplayConfigurations();
            var t3 = GetWin32_DisplayConfigurations.GetCollection();

            Assert.IsNotNull(t3);
        }

        #endregion

    }
}
